package com.mbigger.biz.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.mbigger.biz.message.StreamClient;

@RestController
public class SendMessageController {
    
    @Autowired
    private StreamClient streamClient;
    
    @GetMapping("/send")
    public String send() {
        streamClient.output().send(MessageBuilder.withPayload("streamClient send!!!!!!!!").build());
        return "sended";
    }
}
